home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #9 / K-CD-9-2002.ISO / JASC After Shot / af100evp.exe / Data1.cab / single.xsl39 < prev    next >
Encoding:
Extensible Markup Language  |  2002-02-11  |  6.4 KB  |  140 lines

  1. <?xml version="1.0"?>
  2. <!-- Copyright (C) 1995-2002 Jasc Software, Inc. and its licensors. -->
  3. <!-- All rights reserved. -->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  5.     <xsl:template match="/">
  6.         <HTML>
  7.             <xsl:apply-templates/>
  8.         </HTML>
  9.     </xsl:template>
  10.     <xsl:template match="photos">
  11.         <xsl:apply-templates/>
  12.     </xsl:template>
  13.     <xsl:template match="album">
  14.         <xsl:apply-templates select="imagelist"/>
  15.     </xsl:template>
  16.     <xsl:template match="imagelist">
  17.         <xsl:apply-templates select="imageinfo"/>
  18.     </xsl:template>
  19.     <xsl:template match="imageinfo">
  20.         <xsl:element name="ixfile">
  21.             <xsl:attribute name="fname"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  22.             <head>
  23.                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  24.                 <meta name="copyright" content="Copyright (C) 1995-2002 Jasc Software, Inc. and its licensors. All rights reserved."/>
  25.             </head>
  26.             <body bgcolor="#CCCCFF"  text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  27. <table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
  28.   <tr> 
  29.     <td height="66" background="graphics/sbbanner.jpg" colspan="3"> <div align="center"><font face="Arial" size="6" color="#FF0000"><xsl:value-of select="title"/></font></div></td>
  30.   </tr>
  31.   <tr> 
  32.     <td background="graphics/sbmainleft.jpg" width="15"><img src="graphics/sbmainleft.jpg" width="15" height="56"/></td>
  33.     <td width="710" background="graphics/sbbody.jpg"> 
  34.       <div align="center"> 
  35.         <table width="500" border="0" cellspacing="0" cellpadding="0">
  36.           <tr> 
  37.             <td background=""><xsl:apply-templates select="previous"/></td>
  38.             <td background=""> 
  39.               <div align="right"><xsl:apply-templates select="next"/></div>
  40.             </td>
  41.           </tr>
  42.         </table>
  43.         <table border="0" cellspacing="0" cellpadding="0">
  44.           <tr> 
  45.             <td width="12" height="12" background=""><img src="graphics/sbtl.gif" width="12" height="12"/></td>
  46.             <td height="12" background="graphics/sbt.gif"><img src="graphics/sbshim.gif" width="1" height="1"/></td>
  47.             <td width="12" height="12" background=""><img src="graphics/sbtr.gif" width="12" height="12"/></td>
  48.           </tr>
  49.           <tr> 
  50.             <td background="graphics/sbl.gif"><img src="graphics/sbshim.gif" width="1" height="1"/></td>
  51.             <td background=""><IMG border="0"><xsl:attribute name="src"><xsl:value-of select="@fname"/></xsl:attribute><xsl:attribute name="width"><xsl:value-of select="imagesize/@width"/></xsl:attribute>
  52.                         <xsl:attribute name="height"><xsl:value-of select="imagesize/@height"/></xsl:attribute>
  53.                         <xsl:attribute name="alt"><xsl:value-of select="title"/></xsl:attribute></IMG></td>
  54.             <td background="graphics/sbr.gif"><img src="graphics/sbshim.gif" width="1" height="1"/></td>
  55.           </tr>
  56.           <tr> 
  57.             <td height="12" background=""><img src="graphics/sbbl.gif" width="12" height="12"/></td>
  58.             <td background="graphics/sbb.gif"><img src="graphics/sbshim.gif" width="1" height="1"/></td>
  59.             <td height="12" background=""><img src="graphics/sbbr.gif" width="12" height="12"/></td>
  60.           </tr>
  61.         </table>
  62.         <table width="600" border="0" cellspacing="0" cellpadding="0">
  63.           <tr> 
  64.             <td width="50" background=""><xsl:choose>
  65.                                                             <xsl:when test="audio_info/@fname[. != '']">
  66.                                                                 <div align="right"><xsl:apply-templates select="audio_info"/></div>
  67.                                                             </xsl:when>
  68.                                                             <xsl:otherwise>
  69.                                                                 <div align="right"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  70.                                                             </xsl:otherwise>
  71.                                                         </xsl:choose></td>
  72.             <td width="500" background=""> 
  73.               <div align="center"><font face="Trebuchet MS, Arial" size="2" color="#FFFFFF"><xsl:apply-templates select="description">
  74.                                                                     <!-- recursively apply this template to them -->
  75.                                                                     <xsl:template>
  76.                                                                         <xsl:copy>
  77.                                                                             <xsl:apply-templates select="@* | * | comment() | pi() | text()"/>
  78.                                                                         </xsl:copy>
  79.                                                                     </xsl:template>
  80.                                                                 </xsl:apply-templates></font></div>
  81.             </td>
  82.             <td width="50" background=""><xsl:choose>
  83.                                                     <xsl:when test="movie_info/@fname[. != '']">
  84.                                                         <div align="center"><xsl:apply-templates select="movie_info"/></div>
  85.                                                     </xsl:when>
  86.                                                     <xsl:otherwise>
  87.                                                         <div align="left"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  88.                                                     </xsl:otherwise>
  89.                                                 </xsl:choose></td>
  90.           </tr>
  91.         </table>
  92.       </div>
  93.     </td>
  94.     <td background="graphics/sbmainright.jpg" width="15"><img src="graphics/sbmainright.jpg" width="15" height="40"/></td>
  95.   </tr>
  96.   <tr> 
  97.     <td background="graphics/sbbottom.jpg" colspan="3"><img src="graphics/sbbottom.jpg" width="21" height="4"/></td>
  98.   </tr>
  99. </table>            
  100.             
  101.             
  102.             </body>
  103.         </xsl:element>
  104.     </xsl:template>
  105.     <xsl:template match="audio_info">
  106.         <xsl:if match="audio_info[@fname != '']">
  107.             <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  108.                 <img border="0" src="graphics/sound.gif"/></A>
  109.         </xsl:if>
  110.     </xsl:template>
  111.     <xsl:template match="movie_info">
  112.         <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  113.             <img border="0" src="graphics/movie.gif" width="24" height="28"/></A>
  114.     </xsl:template>
  115.     <xsl:template match="previous">
  116.         <xsl:value-of/>
  117.         <xsl:choose>
  118.             <xsl:when match="previous[@fname != '']">
  119.                 <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  120.                     <font face="Trebuchet MS, Arial" size="2" color="#FFFFFF">Back</font></A>
  121.             </xsl:when>
  122.             <xsl:otherwise>
  123.                 <img src="graphics/transparenth120.gif" width="1" height="1" border="0"/>
  124.             </xsl:otherwise>
  125.         </xsl:choose>
  126.     </xsl:template>
  127.     <xsl:template match="next">
  128.         <xsl:value-of/>
  129.         <xsl:choose>
  130.             <xsl:when match="next[@fname != '']">
  131.                 <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  132.                     <font face="Trebuchet MS, Arial" size="2" color="#FFFFFF">Next</font></A>
  133.             </xsl:when>
  134.             <xsl:otherwise>
  135.                 <img src="graphics/transparenth120.gif" width="1" height="1" border="0"/>
  136.             </xsl:otherwise>
  137.         </xsl:choose>
  138.     </xsl:template>
  139. </xsl:stylesheet>
  140.